package com.example.dziennikposilkow;

import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

public class DodajProdukt extends DziennikMainActivity {
	
	private Button buttonSave1;
    private Button buttonDalej1;
	
	 @Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
	        setContentView(R.layout.activity_dodaj_produkt);
	        
	        getWindow().setSoftInputMode(
	        	      WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
	        
	        Spinner spinner = (Spinner) findViewById(R.id.posilki_spinner);
	     // Create an ArrayAdapter using the string array and a default spinner layout
	     ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
	             R.array.posilki_array, android.R.layout.simple_spinner_item);
	     // Specify the layout to use when the list of choices appears
	     adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
	     // Apply the adapter to the spinner
	     spinner.setAdapter(adapter);
	     
	     	buttonSave1  = (Button)findViewById(R.id.buttonSave1);
	        buttonSave1.setOnClickListener(btnSaveListener1);
	        buttonDalej1  = (Button)findViewById(R.id.buttonDalej1);
	        buttonDalej1.setOnClickListener(btnDalejListener1);
	    
	 }
	 
	 
	 private OnClickListener btnSaveListener1 = new OnClickListener() {
	        public void onClick(View arg0) {
	        	
	        	
	        	
	        }
	        
	 };
	 
	 
	 private OnClickListener btnDalejListener1 = new OnClickListener() {
			public void onClick(View v) {
				
				Intent intent = new Intent(DodajProdukt.this, Kalendarz.class);
    			startActivity(intent);
				
				
			}
			
	 };

}
